//经费认领
<template>
  <div class="module_">
      <el-tabs v-model="activeName"  class="tabs" type="card">
        <el-tab-pane label="经费到款" name="1"></el-tab-pane>
        <el-tab-pane label="经费认领" name="2"></el-tab-pane>
      </el-tabs>
      <!-- <transition name="el-fade-in"> -->
        <component v-bind:is="choseComp" ref="comp"></component>
      <!-- </transition>  -->
  </div>
</template>

<script>
import received from '../components/received'
import claim from '../components/claim.vue'
export default {
    components:{
       received,
       claim
    },
    data(){
        return{
            activeName: '1',
            options:{
                '1': received,
                '2': claim
            }
        }
    },
    computed:{
        choseComp(){
            return this.options[this.activeName]
        },
        editFormVisible(){
            return this.$refs.comp.editFormVisible
        },
    },
    mounted(){
        const activeName = this.$route.query.activeName
        if(activeName  && this.options[activeName]) {
            this.activeName = activeName
        }
    },
    methods:{
        submit(){
            return this.$refs.comp.submit()
        }
    }
}
</script>
